<?

	//$data['find_ikke'] = $deltagere_ider;
	//$data['type'] = $this->uri->segment(4); 
	$data['stam_id'] = $this->uri->segment(2);
	//$data['redirect_soegning'] = base_url()."core/vis/se/".$type."/".$data['stam_id']."/rediger_deltagere";
	$data['redirect_tilfoej'] = base_url()."core/rediger/tilfoej_begivenhed_deltager/";
    $data['omraade'] = "entitet";

    echo "<h2 class='rubrik'>Søg efter nye deltagere</h2>";
    //$this->load->view('soeg/soeg_generel', $data);

//print_r($navne);

$deltagere_grupper = $element_data['begivenhed']['deltagere_grupper'];
$deltagere_individer = $element_data['begivenhed']['deltagere_individer'];

?>




<br><br><br>








    <?
      echo "<div class='row-fluid'>";
        echo "<div class='span6'>";
        
        
               ?>
	<form action="<?php echo base_url();?>core/rediger/tilfoej_begivenhed_deltager" method="post">    
            <input type="text" id="soegning" value="Søg" /> <img id="soeg_over" src="<? echo base_url(); ?>img/lup.png" />
	<input type="hidden" id="overtype" value="entitet">
    <input type="hidden" name="stam_id" value="<? echo $stamdata['id']; ?>">



	<input type="hidden" name="deltager_array" id="array_holder" value="">

		<p class="ink" id="resultater-over" style="font-weight:bold;">
		
		
		</p>
		
		<input type="submit" value="Tilføj">
	</form><?
		echo "</div>";

        echo "<div class='span6' id='fjern-holder'>";
        
?>          
 <form action="<?php echo base_url();?>core/rediger/slet_begivenhed_deltager" method="post">
     <input type="hidden" name="stam_id" value="<? echo $stamdata['id']; ?>">
   <input style="float:right" type="submit" class="rubrik" value="Fjern Deltagere">
    <h2 class="rubrik">Deltagere i <? echo $navne[0]; ?></h2><br>
 <?
            echo "<h3 class='rubrik'>Individer</h3>";
            echo "<p>";
                   foreach($deltagere_individer as $i)
                   {
 
    	                ?><input type="checkbox" value="<? echo $i['id'];?>">
                   <?   echo "<b class='ink'>".$i['navn']."</b>"; 
                        echo "<br>";

		    $id_array[] = $i['id']; 
            }
 



            echo "</p>";
   
            echo "<h3 class='rubrik'>Grupper</h3>";
            echo "<p>";
            foreach($deltagere_grupper as $g)
            {
	
	                ?><input type="checkbox" value="<? echo $g['id'];?>">
<?                  echo "<b class='ink'>".$g['navn']."</b>"; 
                    echo "<br>";
                  
		            $id_array[] = $g['id']; 
            }
 

	?><input type="text" name="id_array" id="fjern-deltagere-array" value=""><?
    


            echo "</p>";
        echo "</div>";
     echo "</div>";

    ?>
    </form>



